import request from "@/utils/request";

/** 业务表单 */
export interface BussinessForm {
  categoryName?: string;
  categoryNo?: string;
  id?: number;
}
/** 业务对象 */
export interface BussinessVO {
  categoryName: string;
  categoryNo: string;
  id: number;
}
class bussinessAPI {
  /** 获取业务列表 */
  static getBussiness() {
    return request<any, BussinessVO[]>({
      url: "/api/bus_category",
      method: "get",
      // data: params,
    });
  }
  /** 新增+修改 业务列表 */
  static updateBussiness(params: BussinessForm) {
    return request<any, BussinessVO[]>({
      url: "/api/bus_category",
      method: "post",
      data: params,
    });
  }
  /** 删除业务列表 */
  static deleteBussiness(id: string) {
    return request({
      url: `/api/bus_category/${id}`,
      method: "delete",
      // data: params,
    });
  }
}

export default bussinessAPI;
